package com.czy.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import javax.servlet.http.HttpServletRequest;

/**
 * @Author: czy
 * @Date: 2019/11/5 16:58
 */
@Controller
public class IndexController {

    /**
     * 首页
     * @return
     */
    @RequestMapping("/")
    public String index(){
        return "demo.html";
    }

    /**
     * 跳转页面专用
     * @param request
     * @return
     */
    @RequestMapping(value = "/toPage",method = RequestMethod.GET)
    public String toPage(HttpServletRequest request){
        String url = request.getParameter("url");
        return url;
    }


}
